/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package my.cbr.database.model;

import jcolibri.cbrcore.Attribute;
import jcolibri.cbrcore.CaseComponent;

/**
 *
 * @author Geir Ole
 */
public class Vaccine implements CaseComponent{
    private Integer vaccineID;
    private String name;

    public Vaccine(Integer vaccineID, String name) {
        this.vaccineID = vaccineID;
        this.name = name;
    }

    public Vaccine() {
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getVaccineID() {
        return vaccineID;
    }

    public void setVaccineID(Integer vaccineID) {
        this.vaccineID = vaccineID;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final Vaccine other = (Vaccine) obj;
        if (this.vaccineID != other.vaccineID && (this.vaccineID == null || !this.vaccineID.equals(other.vaccineID))) {
            return false;
        }
        if ((this.name == null) ? (other.name != null) : !this.name.equals(other.name)) {
            return false;
        }
        return true;
    }

    @Override
    public int hashCode() {
        int hash = 3;
        hash = 13 * hash + (this.vaccineID != null ? this.vaccineID.hashCode() : 0);
        hash = 13 * hash + (this.name != null ? this.name.hashCode() : 0);
        return hash;
    }

    public Attribute getIdAttribute() {
        return new Attribute("vaccineID", this.getClass());
    }
    
}
